<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>
		<title>权限管理</title>
		<link rel="stylesheet" type="text/css" href="<%=path %>/style/easyui.css">
		<link rel="stylesheet" type="text/css" href="<%=path %>/style/icon.css">
		<link rel="stylesheet" type="text/css" href="<%=path %>/style/neweasyui/themes/gray/panel.css">
		<link rel="stylesheet" type="text/css" href="<%=path %>/style/neweasyui/themes/gray/window.css">
		
		
		<link rel="stylesheet" type="text/css" href="<%=path %>/script/zTree_v3/css/zTreeStyle/zTreeStyle.css" >
  		<link rel="stylesheet" type="text/css" href="<%=path %>/script/zTree_v3/css/demo.css" >
		
		<script type="text/javascript" src="<%=path %>/script/1.11.1.js"></script>
		<script type="text/javascript" src="<%=path %>/script/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="<%=path %>/script/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="<%=path %>/script/dateFormat.js"></script>
		<script type="text/javascript" src="<%=path %>/script/datagrid-bufferview.js"></script>
		<script type="text/javascript" src="<%=path %>/script/common.js"></script>
		
		<script type="text/javascript" src="<%=path %>/script/zTree_v3/js/jquery.ztree.core-3.5.js"></script>  
		<script type="text/javascript" src="<%=path %>/script/zTree_v3/js/jquery.ztree.excheck-3.5.js"></script>  
		<script type="text/javascript" src="<%=path %>/script/zTree_v3/js/jquery.ztree.exedit-3.5.js"></script> 
		
	</head>
	<frameset framespacing="0" border="5" cols="15%,*" frameborder="2"   marginwidth="0" marginheight="0" >
		<frame id="rightLeft" name="rightLeft" scrolling="auto" target="left" src="../authority/rightLeft.jsp"
			noresize="true" marginwidth="0" marginheight="0">
		<frame name="rightRight" id="rightRight" scrolling="auto" src="../authority/rightRight.jsp" marginwidth="0"
			noresize="true" marginheight="0">
			<noframes>
			<h1>nothing</h1>
			</noframes>
	</frameset>  
<!--  	<div id="cc" class="easyui-layout" style="width:600px;height:400px;"fit="true">
        <div id="west1" data-options="region:'west',split:true" style="width:300px;">
        	<ul id="demo1" class="ztree" style="width:280px;height:790px;border:0px #000 ;overflow:auto;"></ul>
        </div>
        <div id="center1" data-options="region:'center'" style="padding:5px;background:#eee;">
        	 <div id="east1" class="easyui-tabs"  fit="true" border="false" >
	        	 
        	 </div>
        </div>
    </div>
<script type="text/javascript">
   	 //window.location.href=$("#west").href="../authority/rightLeft.jsp";
	$.ajaxSetup({async : false});  
	var setting = {
			async:{
				enable: false,
			},
			data:{
				simpleData:{
					enable:true,
				}
			},
			callback:{
				onClick:onClick
			}
	}
	rData1 = new Array();
	$.get("<%=basePath %>authority/left/tree",function(data){
		rData1 = data;
	});
	$.fn.zTree.init($("#demo1"),setting,rData1);
	//每一个被选中的节点 触发的单击事件
	function onClick(event, treeId, treeNode, clickFlag){
		closeAllTab();
		$.get("<%=basePath %>authority/right/detail/"+treeNode.id+"?value=1");
		var url = "<%=basePath %>pages/authority/rightRight.jsp";
		var subtitle = treeNode.name;
		if(!$("#east1").tabs("exists",subtitle)){
			$("#east1").tabs("add",{
				title:subtitle,
				content:"<iframe scrolling='auto' frameborder='0'  src='"+url+"' style='width:100%;height:100%;''></iframe>",
				//href:url,
				closable:true,
				width:$('#east1').width()-10,
				height:$('#east1').height()-26
				
			});
		}else{
			$("#east1").tabs("select",subtitle);
		}
	}
	//关闭所有的tab
	function closeAllTab() {
	    $(".tabs li").each(function(index, obj) {
	          //获取所有可关闭的选项卡
	        var tab = $(".tabs-closable", this).text();
	        $(".easyui-tabs").tabs('close', tab);
	    });
	    $("#close").remove();//同时把此按钮关闭
	}
</script>-->
</html>
